package com.sproutcat.sample.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author tzg
 */
@Service
@Slf4j
public class FanoutReceiver {

    @RabbitListener(queues = "fanout.A")
    public void receiverA(Map testMessage) {
        log.debug(" FanoutReceiver A 消费者收到消息 : {}", testMessage.toString());
    }

    @RabbitListener(queues = "fanout.B")
    public void receiverB(Map testMessage) {
        log.debug(" FanoutReceiver B 消费者收到消息 : {}", testMessage.toString());
    }

    @RabbitListener(queues = "fanout.C")
    public void receiverC(Map testMessage) {
        log.debug(" FanoutReceiver C 消费者收到消息 : {}", testMessage.toString());
    }

}
